package com.example.noval.network.api

import android.util.Log
import java.lang.Exception

/**
 * @Description
 * @Author zzl
 * @Date 2024/3/25
 */
data class ApiResult<T>(
    val code: Int,
    val message:String,
    val currentTime:Long,
    private val data:T?
) {
    
    fun apiData(): T? {
        if(code==200||data!=null){
            return data
            
        }
        else{
           throw ApiException(code,message)

        }
        
    }
    
    
}